package com.aispace.taichu.modules.agent;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.aispace.taichu.modules.agent.llm.ILLmService;
import com.aispace.taichu.modules.agent.llm.LLMService;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

/**
 * @author chengjie.guo
 *
 * @see AgentState
 * @see LLMService
 */
@Slf4j
@Data
public abstract class BaseAgent {

    private int maxSteps;

    private int currentStep = 0;

    protected ILLmService llmService;

    /**
     * 获取代理的名称
     */
    public abstract String getName();

    /**
     * 获取代理的详细描述
     */
    public abstract String getDescription();


    protected abstract AgentExecResult step();


    public String run() {
        return "BaseAgent run";
    }


    public record AgentExecResult(@JsonProperty("result") String result, @JsonProperty("state") AgentState state) {}


}
